<?php if (!defined('MAX_ON')){echo "<h1>ACCESS DENIED</h1>You cannot access this file directly.";exit();} ?>
<?php if ($template_hook=='start'){ ?>
<?php }elseif ($template_hook=='1'){ ?>
	<table class="forum-board-forum-head" cellpadding="0" cellspacing="0">
	
		<tr><td class="forum-topic-subject"><?php echo $lang_admin['admin_title']; ?></td></tr>
		<tr><td class="forum-index-topic-sub"> </td></tr>
	
	</table>
	
	<table class="forum-index" cellpadding="0" cellspacing="0">
	
		<tr><td class="forum-index-stats-header forum-index-top"><?php echo $lang_admin['admin_settings']; ?></td></tr>
		
		<tr>
			<td class="forum-jump-content" style="width: 100%;">
			
				<form method="post" action="<?php echo $max_domain; ?>/index.php?page=admin&act=gallery">
			
				<div class="f_right" style="width: 30%"><?php echo $lang_admin['admin_thumb_height']; ?></div>
				<div class="f_right" style="width: 70%"><input type="text" name="t_max_height" value="<?php echo $Gallery->setting('t_max_height'); ?>" /> px</div>
				
				<br /><br />
				
				<div class="f_right" style="width: 30%"><?php echo $lang_admin['admin_thumb_width']; ?></div>
				<div class="f_right" style="width: 70%"><input type="text" name="t_max_width" value="<?php echo $Gallery->setting('t_max_width'); ?>" /> px</div>
				
				<br /><br />
				
				<div class="f_right" style="width: 30%"><?php echo $lang_admin['admin_image_size']; ?></div>
				<div class="f_right" style="width: 70%"><input type="text" name="image_size" value="<?php echo $Gallery->setting('image_max_size'); ?>" /> kb</div>
				
				<br /><br />
				
				<div class="f_right" style="width: 30%"><?php echo $lang_admin['admin_image_exts']; ?></div>
				<div class="f_right" style="width: 70%"><input type="text" name="image_exts" value="<?php echo $Gallery->setting('image_extensions'); ?>" /></div>
				
				<br /><br />
				
				<div class="f_right" style="width: 30%"><?php echo $lang_admin['admin_image_reflections']; ?></div>
				<div class="f_right h_right" style="width: 70%">
				
					<?php $checked = ($Gallery->setting('image_reflections') == 1) ? 'checked' : ''; ?>
					
					<input type="checkbox" name="image_reflections" value="1" <?php echo $checked; ?> />
					
				</div>
				
				<br /><br />
				
				<div class="f_right" style="width: 30%"><?php echo $lang_admin['admin_image_perpage']; ?></div>
				<div class="f_right" style="width: 70%"><input type="text" name="image_perpage" value="<?php echo $Gallery->setting('image_perpage'); ?>" /></div>
				
				<br /><br /><br />
				
				<div class="f_right" style="width: 30%">&nbsp;</div>
				<div class="f_right" style="width: 70%"><input type="submit" class="img-submit" value="<?php echo $lang['button_submit']; ?>" /></div>
				
				</form>
			
			</td>
		</tr>
		
		<tr>
			<td class="forum-index-stats-header forum-index-top">
			
				<span style="float: <?php echo $lang['header_right']; ?>"><?php echo $lang_admin['admin_albums']; ?></span>
				
				<span style="float: <?php echo $lang['header_left']; ?>;">
				
					<a href="<?php echo max_link('index.php?page=admin&act=gallery&sub=add_album', 'admin/gallery/add_album'); ?>"><?php echo $lang_admin['admin_add_album']; ?></a>
					
				</span>
			
			</td>
		</tr>
		
		<tr>
			<td class="forum-jump-content" style="width: 100%;">
			
				<table class="forum-index" cellpadding="0" cellspacing="0">
<?php }elseif ($template_hook=='2'){ ?>
					<tr style="background-color: <?php echo $bgcolor; ?>">
						<td style="border-bottom: 1px solid grey; padding: 5px; width: 25%">
							<a href="<?php echo max_link('index.php?page=admin&act=gallery&sub=edit_album&id=' . $row['id'], 'admin/gallery/edit_album/' . $row['id']); ?>"><?php echo strip_slashes($row['name']); ?></a>
						</td>
						<td style="border-bottom: 1px solid grey; padding: 5px"><?php echo strip_slashes($row['description']); ?></td>
						<td style="border-bottom: 1px solid grey; padding: 5px; width: 5%">
							
							<a href="<?php echo max_link('index.php?page=admin&act=gallery&sub=delete_album&id=' . $row['id'], 'admin/gallery/delete_album/' . $row['id']); ?>" onclick="javascript:return confirm('<?php echo $lang['topic_remove']; ?>')">
								<img src="<?php echo $delete_icon_img; ?>" alt="<?php echo $lang_admin['custom_delete']; ?>" />
							</a>
						
						</td>
					</tr>
<?php }elseif ($template_hook=='3'){ ?>
				</table>
				
				
			
			</td>
		</tr>
		
	</table>
	
	<table class="forum-index-forum-footer" cellpadding="0" cellspacing="0">
		<tr><td class="forum-index-forum-footer-contents"> </td></tr>
	</table>
<?php }elseif ($template_hook=='4'){ ?>
	<table class="forum-board-forum-head" cellpadding="0" cellspacing="0">
	
		<tr><td class="forum-topic-subject"><?php echo $lang_admin['admin_add_album']; ?></td></tr>
		<tr><td class="forum-index-topic-sub"> </td></tr>
	
	</table>
	
	<table class="forum-index" cellpadding="0" cellspacing="0">
	
		<tr><td class="forum-index-stats-header forum-index-top"><?php echo $lang_admin['album_details']; ?></td></tr>
		
		<tr>
			<td class="forum-jump-content" style="width: 100%;">
			
				<form enctype="multipart/form-data" method="post" action="<?php echo $max_domain; ?>/index.php?page=admin&act=gallery&sub=add_album">
			
				<div class="f_right" style="width: 30%"><?php echo $lang_admin['album_title']; ?></div>
				<div class="f_right" style="width: 70%"><input type="text" name="title" /></div>
				
				<br /><br />
				
				<div class="f_right" style="width: 30%"><?php echo $lang_admin['album_image']; ?></div>
				<div class="f_right" style="width: 70%"><input type="file" name="image" /></div>
				
				<br /><br />
				
				<div class="f_right" style="width: 30%"><?php echo $lang_admin['album_description']; ?></div>
				<div class="f_right" style="width: 70%"><textarea name="description" cols="60" rows="10"></textarea></div>
				
				<br /><br />
				
				<div class="f_right" style="width: 30%">&nbsp;</div>
				<div class="f_right" style="width: 70%"><input type="submit" class="img-submit" value="<?php echo $lang['button_submit']; ?>" /></div>
				
				</form>
			
			</td>
		</tr>
		
	</table>

	<table class="forum-index-forum-footer" cellpadding="0" cellspacing="0">
		<tr><td class="forum-index-forum-footer-contents"> </td></tr>
	</table>
<?php }elseif ($template_hook=='5'){ ?>
	<table class="forum-board-forum-head" cellpadding="0" cellspacing="0">
	
		<tr><td class="forum-topic-subject"><?php echo $lang_admin['admin_editing'] . $info['name']; ?></td></tr>
		<tr><td class="forum-index-topic-sub"> </td></tr>
	
	</table>
	
	<table class="forum-index" cellpadding="0" cellspacing="0">
	
		<tr><td class="forum-index-stats-header forum-index-top"><?php echo $lang_admin['album_details']; ?></td></tr>
		
		<tr>
			<td class="forum-jump-content" style="width: 100%;">
			
				<form enctype="multipart/form-data" method="post" action="<?php echo $max_domain; ?>/index.php?page=admin&act=gallery&sub=edit_album">
				
				<input type="hidden" name="id" value="<?php echo $info['id']; ?>" />
				
				<div class="f_right" style="width: 30%">&nbsp;</div>
				<div class="f_right" style="width: 70%"><img src="<?php echo $max_domain . $info['image']; ?>" /></div>
				
				<br /><br />
			
				<div class="f_right" style="width: 30%"><?php echo $lang_admin['album_title']; ?></div>
				<div class="f_right" style="width: 70%"><input type="text" name="title" value="<?php echo $info['name']; ?>" /></div>
				
				<br /><br />
				
				<div class="f_right" style="width: 30%"><?php echo $lang_admin['album_image']; ?></div>
				<div class="f_right" style="width: 70%"><input type="file" name="image" /></div>
				
				<br /><br />
				
				<div class="f_right" style="width: 30%"><?php echo $lang_admin['album_description']; ?></div>
				<div class="f_right" style="width: 70%"><textarea name="description" cols="60" rows="10"><?php echo $info['description']; ?></textarea></div>
				
				<br /><br />
				
				<div class="f_right" style="width: 30%">&nbsp;</div>
				<div class="f_right" style="width: 70%"><input type="submit" class="img-submit" value="<?php echo $lang['button_submit']; ?>" /></div>
				
				</form>
			
			</td>
		</tr>
		
	</table>

	<table class="forum-index-forum-footer" cellpadding="0" cellspacing="0">
		<tr><td class="forum-index-forum-footer-contents"> </td></tr>
	</table>
<?php }elseif ($template_hook=='end'){ ?>
<?php } ?>